package cn.shengongying.service.impl;

import cn.shengongying.dao.BossCompanyCardMapper;
import cn.shengongying.model.BossCompanyCard;
import cn.shengongying.service.IBossCompanyCardService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 雇主企业名片 服务实现类
 * </p>
 *
 * @author RXK
 * @since 2022-01-05
 */
@Service
public class BossCompanyCardServiceImpl extends ServiceImpl<BossCompanyCardMapper, BossCompanyCard> implements IBossCompanyCardService {

    private final BossCompanyCardMapper bossCompanyCardMapper;

    public BossCompanyCardServiceImpl(BossCompanyCardMapper bossCompanyCardMapper) {
        this.bossCompanyCardMapper = bossCompanyCardMapper;
    }


    @Override
    public BossCompanyCard findByUserId(Long userId) {
        return bossCompanyCardMapper.findByBossId(userId);
    }

    @Override
    public List<BossCompanyCard> listAndPage(String companyName, int start, int length) {
        return bossCompanyCardMapper.listAndPage(companyName,start,length);
    }

    @Override
    public long countByCondition(String companyName) {
        return bossCompanyCardMapper.countByCondition(companyName);
    }
}
